-- GENERATED SPELL FOR [Mogh the Undying] --


function spell0_1060(pUnit, Event) --@Shadow Bolt,n/a--
pUnit:FullCastSpellOnTarget(12471,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_1060', 3000, 1)
end

function spell1_1060(pUnit, Event) --@Slave Drain,Heal--
pUnit:FullCastSpellOnTarget(8809,pUnit)
pUnit:RegisterEvent('Sorts_1060', 1000, 1)
end

function spell2_1060(pUnit, Event) --@Summon Kurzen Mindslave,Self--
pUnit:FullCastSpellOnTarget(8813,pUnit)
pUnit:RegisterEvent('Sorts_1060', 543, 1)
end

function Sorts_1060(pUnit, Event)
local choix_sorts_1060 = math.random(0, 2)
if choix_sorts_1060 == 0 then
pUnit:RegisterEvent('spell0_1060', 1, 1)
end
if choix_sorts_1060 == 1 then
pUnit:RegisterEvent('spell1_1060', 1, 1)
end
if choix_sorts_1060 == 2 then
pUnit:RegisterEvent('spell2_1060', 1, 1)
end
end

function mob1060_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_1060', math.random(1500, 3000), 1)
end

function mob1060_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1060_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob1060_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(1060, 1, 'mob1060_Action')
RegisterUnitEvent(1060, 2, 'mob1060_Leave')
RegisterUnitEvent(1060, 3, 'mob1060_Kill')
RegisterUnitEvent(1060, 4, 'mob1060_Die')
